home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / snip1292.zip / WHICH_C.TXT < prev    next >
Text File  |  1992-12-26  |  10KB  |  222 lines

  1. Q:  Which PC C/C++ compiler is best and what should I buy?
  2.  
  3. A:  This is perhaps the commonest of Frequently Asked Questions (FAQ's),
  4. especially by beginning C'er. The honest answer is that there is no "best"
  5. compiler and what may be best for you depends to a large degree on what
  6. you'll be using it for. The PC C/C++ compiler market is quite brutal and the
  7. companies that have survived have done so because some number of people
  8. think each of them makes the "best" compiler.
  9.  
  10.     With the preceding caveat in mind, following are some summaries of the
  11. current crop of C/C++ compilers with some of their strengths and weaknesses.
  12.  
  13.  
  14. MIX POWER C
  15. -----------
  16.  
  17. Power C is the least expensive PC C compiler on the market. The compiler
  18. itself is $20, and an additional $30 will buy their source-level debugger
  19. along with the complete library source code with an assembler.
  20.  
  21. So, what's the catch?
  22.  
  23. None, actually. Power C is a quite decent and ANSI-conforming compiler which
  24. compiles relatively tight, fast code relatively quickly. It's biggest
  25. drawback is its use of a non-standard object file format which obviates
  26. object-level compatibility with any other compiler using Microsoft/Intel
  27. standard object file formats. Another problem is lack of support from 3rd
  28. party library vendors. Although Mix sells a wide range of libraries
  29. themselves, it's difficult to convince a vendor to produce a $100 add-on
  30. library for a $20 compiler.
  31.  
  32. On the plus side, Power C comes with the best user's manual for students in
  33. the business. The beginner's tutorial section has enabled many beginning C
  34. programmers to get up to speed without spending another dime on any other
  35. textbooks. Should you want more instruction, Mix sells a package including
  36. Power C with the library source and debugger along with the book "Master C"
  37. for only $60.
  38.  
  39. Power C's primary technical claim to fame is its floating point which
  40. challenges the industry leader, Watcom, in many cases.
  41.  
  42.  
  43. QUICK C (QC)
  44. ------------
  45.  
  46. Microsoft's baby compiler comes in versions for DOS and Windows. Fully
  47. compatible with the "big" Microsoft compiler, QC is an excellent tool for
  48. the C programmer on a budget. The Windows version is a cheap and relatively
  49. painless way to get into the world of Windows programming. The DOS version
  50. is one of those rare compilers these days that still runs on minimal systems
  51. without requiring fast processors and gobs of memory.
  52.  
  53. QC's big selling point is its compatibility with full-blown Microsoft C.
  54. It's biggest drawback at this point is Microsoft's apparent loss of interest
  55. in supporting its "Quick" languages.
  56.  
  57.  
  58. TURBO C++ (TC++)
  59. ----------------
  60.  
  61. TC++ is to Borland's "big" C++ compiler as QC is to Microsoft's "big" C
  62. compiler. Targeted at the hobbyist market, the latest version (TC++ 3.0)
  63. raised quite a stir when Borland released it requiring at least a 286
  64. processor and 1 Mb of *available* extended memory above the normal 640K DOS
  65. limit.  Many hobbyists running on older XT's, or machines without the excess
  66. memory capacity have therefore failed to upgrade to the new release.
  67.  
  68. If you have the machine to support it, TC++ has the usual Borland attributes
  69. of extreme ease-of-use, attractive Integrated Development Environment (IDE),
  70. and good supporting tools.
  71.  
  72.  
  73. MICROSOFT C/C++ (MSC)
  74. ---------------------
  75.  
  76. Microsoft's professional compiler is now at version 7.0, requiring at least
  77. a 386 processor, 4 Mb of *available* extended memory, and a DPMI server.
  78. Microsoft's original intent was that everyone would be working in a Windows
  79. environment (Windows 3+ is a DPMI server), but includes Qualitas' 386Max
  80. memory manager (another DPMI server) in the package just in case. If you
  81. don't have the machine resources or you want to run another memory manager
  82. such as QEMM, you can't use MSC.
  83.  
  84. On the plus side, MSC 7 is an excellent C++ compiler and generates
  85. executables which may not always be smaller than Borland, but usually
  86. execute faster. MSC is still the standard for PC C compilers and it shows in
  87. the ready availability of 3rd party libraries supporting it. Compile times
  88. with full optimization are still quite sluggish, but using the quick compile
  89. option can be provide acceptable results.
  90.  
  91.  
  92. BORLAND C++ (BC++)
  93. ------------------
  94.  
  95. BC++ carries on Borland's tradition of providing excellent bang for the
  96. buck. The latest release (3.1) of their professional compiler is an
  97. attractive alternative to shops also considering MSC 7. BC++ isn't as
  98. demanding as MSC and only requires a 286 and 2 Mb of *available* extended
  99. memory to run.
  100.  
  101. Borland's tools are uniformly excellent, but the compiler still suffers a
  102. bit in comparison to the industry's technological leaders, Microsoft,
  103. Watcom, and Zortech - although the gap is closing. As with MSC, it's an
  104. excellent C++ compiler and enjoys widespread support among 3rd party library
  105. vendors. Like all Borland compilers, ease of use was a design priority, all
  106. oriented to the excellent IDE.
  107.  
  108.  
  109. ZORTECH C++ (ZTC++)
  110. -------------------
  111.  
  112. ZTC++ was the industry's first C++ compiler, but has fallen behind in
  113. tracking the C++ language spec recently. Bought out by Symantec last year,
  114. the current compiler is an excellent C compiler and a good C++ compiler.
  115.  
  116. Zortech's biggest strength is it's cross-platform support with available
  117. versions for DOS, OS/2 (1.x currently with 2.0 in beta), Mac, and Unix.
  118. While Borland bundles some of the best tools, ZTC++ bundles excellent
  119. libraries and add-ons for the compiled code. Examples include a TSR library,
  120. swapping spawn functions, 2 royalty-free DOS extenders, and an excellent set
  121. of ancillary C and C++ tools libraries. ZTC++ is currently also the only PC
  122. compiler which generates true 32-bit code and has a switch for generating
  123. 486 code.
  124.  
  125. ZTC++ has always been in the forefront of optimizer technology along with
  126. Microsoft and Watcom. An undocumented feature of the version 3 compiler is
  127. full IEEE-754 and NCEG (Numerical C Extensions Group (an ANSI working
  128. committee trying to make C a suitable replacement for FORTRAN) compatibilty.
  129.  
  130. Negatives include poor support (but getting slowly better) since the
  131. Symantec buyout and somewhat primitive supporting tools, especially for
  132. Windows development.
  133.  
  134.  
  135. WATCOM C (WC)
  136. -------------
  137.  
  138. Watcom is the technological leader of the industry, performing feats of
  139. optimization and floating point speed other vendors only dream of. The cost
  140. is compile speed, which can best be described as glacial. For all its
  141. technical excellence, WC is still a niche market compiler like ZTC++. As
  142. such, it's 3rd party support is poor, but many have found that MSC libraries
  143. will work just fine with WC.
  144.  
  145. Also, like ZTC++, WC supports 32-bit code generation which, unlike ZTC++, is
  146. even available for OS/2 2.0 today. WC is the compiler of choice for many
  147. OEMs, such as Novell, who want only the best supporting code for their
  148. products.
  149.  
  150.  
  151. TOPSPEED C (TSC)
  152. ----------------
  153.  
  154. TSC has had a rocky life, getting off to a late start in the market and
  155. never having really quite caught on. Originally, TSC was a Turbo C clone
  156. which shared tools and environments with its sister Modula-2 compiler. More
  157. recent versions have extended this by using a modular approach with an
  158. environment supporting "plug-in" compilers for various languages which can
  159. all be used together. The company was recently acquired by Clarion.
  160.  
  161. TSC's undisputed biggest strength is its smart linker and various features
  162. added to facilitate mixed-language programming (Modula-2, for example,
  163. supports multi-threaded code). Using this technology, you can count on TSC
  164. to almost always produce the smallest executables for a given piece of
  165. source code. The library, written almost exclusively in assembly, is also
  166. excellent and contributes to the frugal use of run-time memory.
  167. Unfortunately, compiler-generated code is typically not of the same quality.
  168.  
  169. Drawbacks include almost non-existant 3rd party support and the pervasive
  170. IDE which feels more at home to Modula-2 programmers than C programmers.
  171.  
  172.  
  173. PCC
  174. ---
  175.  
  176. The Personal C Compiler is available as shareware. It used to be marketed as
  177. the deSmet C compiler and had a generally good reputation for quick compile
  178. times and tight code. Unfortunately, the product hasn't been upgraded in
  179. quite a while and can't stand too much comparison. Mix Power C costs less to
  180. buy than PCC and offers better performance and the ANSI compliance that PCC
  181. lacks.
  182.  
  183.  
  184. GNU C/C++ (GCC, G++)
  185. --------------------
  186.  
  187. Available from the Free Software Foundation, GCC and G++ are the only
  188. compilers listed here available for free without a guilty conscience.
  189. Originally written for Unix systems, there are several DOS ports available,
  190. all of which require some sort of DOS extender technology built-in in order
  191. to work in DOS's limited memory.
  192.  
  193. Performance is decent, but not earth-shattering and if you plan to use one
  194. of these to write commercial code, be sure and read the license agreement
  195. *very* closely.
  196.  
  197.  
  198. DUNFIELD MICRO-C
  199. ----------------
  200.  
  201. There have been many "small" or "tiny" C's over the years, some useful for
  202. teaching the rudiments of compiler construction, others not much use for
  203. anything. Small C's typically lack structs, unions, bit fields, and even
  204. long integers.
  205.  
  206. Why bother listing this one then?
  207.  
  208. For one thing, the source code (available when you register the shareware
  209. version) is quite decent and really can teach you something about compiler
  210. internals. But Micro-C is genuinely useful for a lot more reasons.
  211.  
  212. The author also produces cross-assemblers for a variety of microprocessors
  213. and provides plug-in code generators for his C compiler to use with those
  214. chips as well. The 80x86 version comes ready to compile either PC or
  215. embedded code. Included in the PC library are support for writing TSR's,
  216. interrupt-driven serial I/O, and screen windowing. Amazingly, it also sports
  217. an optimizer, but requires MASM or equivalent for compiling PC applications.
  218.  
  219. Supporting small and tiny model only, Micro-C executables are phenomenally
  220. small. "Hello world" programs that run 5-6K on other ocmpilers run under 600
  221. bytes when compiled with Micro-C.
  222.